<template lang="">
    <div class="profile">
        <div class="title">
            <span @click="goProItem(item.pathName)" v-for="(item, index) in proNav" :key="index">{{item.name}}</span>
        </div>
        <div class="content">
            <!-- <keep-alive>
                <router-view v-if="$route.meta.keepAlive"> </router-view>
            </keep-alive>
            <router-view v-if="!$route.meta.keepAlive"> </router-view> -->
            <router-view></router-view>
        </div>

    </div>
</template>
<script>
export default {
  data () {
    return {
      proNav: [{
        id: 1,
        name: '我的订单',
        pathName: 'myOrder'
      },
      {
        id: 2,
        name: '个人信息',
        pathName: 'myInfo'
      },
      {
        id: 3,
        name: '修改密码',
        pathName: 'changepsw'
      },
      {
        id: 4,
        name: '邮箱换绑',
        pathName: 'changeemail'
      },
      {
        id: 5,
        name: '登录记录',
        pathName: 'loginRecord'
      },
      {
        id: 6,
        name: '实名认证',
        pathName: 'browseRecord'
      }
      ]
    }
  },
  methods: {
    goProItem (path) {
      this.$router.push({
        name: path
      })
    }
  },
}
</script>
<style lang="less" scoped>
@import url("./index.less");
</style>